import bus from "@/bus";
let data = {
	status: 'pass',
	totalItem: 1,
	pageSize: window.$pageSize,
  currentPage: 1,
  columns: [{
    title: '编号',
    align: 'left',
    key: 'materialSn',
    width: 200
  }, {
    title: '名称',
    align: 'left',
    key: 'materialName',
    minWidth: 250,
    tooltip: true
  }, {
    title: '品牌',
    align: 'left',
    key: 'materialBrand',
    minWidth: 150,
    tooltip: true
  }, {
    title: '规格',
    align: 'left',
    key: 'materialSpec',
    minWidth: 150,
    tooltip: true
  }, {
    title: '花纹',
    align: 'left',
    key: 'materialFigure',
    minWidth: 150,
    tooltip: true
  }, {
    title: '层级',
    align: 'left',
    minWidth: 80,
    key: 'materialLayer'
  }, {
    title: '已绑商品',
    align: 'left',
    key: 'productCenterName',
    minWidth: 150,
    render: (h, p) => <span>{p.row.productCenterName || '--'}</span>
  }, {
    title: '需绑定',
    minWidth: 80,
    align: 'right',
    render: (h, p) => {
      let openSlot = h('span', {
        slot: 'open'
      }, '开')
      let closeSlot = h('span', {
        slot: 'close'
      }, '关')
      return h('i-switch', {
        props: {
          type: 'primary',
          value: p.row.needBind
        },
        on: {
          'on-change': (value) => {
            bus.$emit('onSwitch', {row: p.row, type: 2})
          }
        }
      }, [openSlot, closeSlot])
    }
  }],
  data: []
}
export default data;